package com.yksj.healthtalk.ui.home;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

import com.yksj.healthtalk.comm.BaseFragmentActivity;
import com.yksj.healthtalk.ui.R;
import com.yksj.healthtalk.ui.chatting.ChatActivity;

/**
 * 多美医生与多美助手
 * @author zhao
 *
 */
public class TestListFragmentActivity extends BaseFragmentActivity implements OnClickListener {
	
	int type;
	
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		type = getIntent().getIntExtra("parame",0);
		setContentView(R.layout.test_list_layout);
		
		initTitle();
		
		initView();
	}
	
	private void initView(){
		findViewById(R.id.set_title).setBackgroundResource(R.drawable.setting_title_bg);
		
		titleLeftBtn.setText(getString(R.string.back));
		titleLeftBtn.setOnClickListener(this);
		ImageView imageView = (ImageView)findViewById(R.id.imageView1);
		imageView.setImageDrawable(getResources().getDrawable(type==0?R.drawable.home_icondoctress:R.drawable.icon_healper));
		titleTextV.setText(type==0?"我的医生":"我的助理");
		findViewById(R.id.list_item).setOnClickListener(this);
		findViewById(R.id.imageView1).setOnClickListener(this);
		TextView textView = (TextView)findViewById(R.id.textView1);
		textView.setText(type==0?"我的医生":"我的助理");
		
	}
	
	@Override
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.title_back:
			onBackPressed();
			break;
		case R.id.list_item:
			Intent intent = new Intent(this,ChatActivity.class);
			startActivity(intent);
			break;
		case R.id.imageView1:
			break;
		}
		
	}
}
